home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0957 / gnugrep / gui / grep.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-22  |  1.6 KB  |  47 lines

  1. /* grep.h - interface to grep driver for searching subroutines.
  2.    Copyright (C) 1992 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  17.  
  18.  
  19.     /* Grep.c expects the matchers vector to be terminated
  20.          by an entry with a NULL name, and to contain at least
  21.          an entry named "default". */
  22.  
  23.     extern struct matcher
  24.     {
  25.         char *name;
  26.         void (*compile)(char *, size_t);
  27.         char *(*execute)(char *, size_t, char **);
  28.     } matchers[];
  29.  
  30.  
  31.     /* Exported from grep.c. */
  32.     extern char *matcher;
  33.  
  34.     /* The following flags are exported from grep for the matchers
  35.          to look at. */
  36.     extern int match_icase;        /* -i */
  37.     extern int match_words;        /* -w */
  38.     extern int match_lines;        /* -x */
  39.  
  40. class CGrepView;
  41.  
  42. typedef BOOL (*GrepDisplayCallback)(CGrepView *pView, CString strLine);
  43.  
  44. int Grep(CGrepView *pView, GrepDisplayCallback GrepCallback);
  45. void DoGrep(CString strDir, CGrepView *pView, GrepDisplayCallback GrepCallback);
  46.  
  47.